package com.item.audrey_hepburn.entity.db2;/*/**

 _______  _______________   _________________________  __________ ____ ___  ________ 
 \      \ \_   _____/\   \ /   /\_   _____/\______   \ \______   \    |   \/  _____/ 
 /   |   \ |    __)_  \   Y   /  |    __)_  |       _/  |    |  _/    |   /   \  ___ 
/    |    \|        \  \     /   |        \ |    |   \  |    |   \    |  /\    \_\  \
\____|__  /_______  /   \___/   /_______  / |____|_  /  |______  /______/  \______  /
        \/        \/                    \/         \/          \/                 \/ 
 
 * @Auther: WD
 * @Date: 19-5-3 21:03
 * @Description: 
 */

import com.item.audrey_hepburn.Enum.CityEnum;

public class Ticket {

    //车次
    private String TRAINNUMBER;

    //车票类型
    private String TICKETTYPE;

    //出发站
    private String START;

    //到达站
    private String END;

    //出发时间
    private String STARTTIME;

    //到达时间
    private String ENDTIME;

    //历时
    private String USETIME;

    //商务座
    private String BUSINESSBLOCK;

    //一等座
    private String FIRSTCLASSSEAT;

    //二等座
    private String SECONDCLASSSEAT;

    //软卧
    private String HIGHGRADESOFTBERTH;

    //一等卧
    private String ORDINARYSOFTSLEEPER;

    //二等卧
    private String HARDSLEEPER;

    //软座
    private String SOFTSEATS;

    //硬座
    private String HARDSEAT;

    //无座
    private String NOSEAT;

    //备注
    private String REMARKS;

    public Ticket() {
    }

    public Ticket(Builder builder) {
        this.TRAINNUMBER = builder.TRAINNUMBER;
        this.TICKETTYPE = builder.TICKETTYPE;
        this.START = builder.START;
        this.END = builder.END;
        this.STARTTIME = builder.STARTTIME;
        this.ENDTIME = builder.ENDTIME;
        this.USETIME = builder.USETIME;
        this.BUSINESSBLOCK = builder.BUSINESSBLOCK;
        this.FIRSTCLASSSEAT = builder.FIRSTCLASSSEAT;
        this.SECONDCLASSSEAT = builder.SECONDCLASSSEAT;
        this.HIGHGRADESOFTBERTH = builder.HIGHGRADESOFTBERTH;
        this.ORDINARYSOFTSLEEPER = builder.ORDINARYSOFTSLEEPER;
        this.HARDSLEEPER = builder.HARDSLEEPER;
        this.SOFTSEATS = builder.SOFTSEATS;
        this.HARDSEAT = builder.HARDSEAT;
        this.NOSEAT = builder.NOSEAT;
        this.REMARKS = builder.REMARKS;
    }

    public static class Builder{
        //车次
        private String TRAINNUMBER;

        //车票类型
        private String TICKETTYPE;

        //出发站
        private String START;

        //到达站
        private String END;

        //出发时间
        private String STARTTIME;

        //到达时间
        private String ENDTIME;

        //历时
        private String USETIME;

        //商务座
        private String BUSINESSBLOCK;

        //一等座
        private String FIRSTCLASSSEAT;

        //二等座
        private String SECONDCLASSSEAT;

        //高级软卧
        private String HIGHGRADESOFTBERTH;

        //一等卧
        private String ORDINARYSOFTSLEEPER;

        //二等卧
        private String HARDSLEEPER;

        //软座
        private String SOFTSEATS;

        //硬座
        private String HARDSEAT;

        //无座
        private String NOSEAT;

        //备注
        private String REMARKS;

        public Builder setTRAINNUMBER(String TRAINNUMBER) {
            this.TRAINNUMBER = TRAINNUMBER;
            return this;
        }

        public Builder setTICKETTYPE(String TICKETTYPE) {
            this.TICKETTYPE = TICKETTYPE;
            return this;
        }

        public Builder setSTART(String START) {
            this.START = CityEnum.getByName(START);
            return this;
        }

        public Builder setEND(String END) {
            this.END = CityEnum.getByName(END);
            return this;
        }

        public Builder setSTARTTIME(String STARTTIME) {
            this.STARTTIME = STARTTIME;
            return this;
        }

        public Builder setENDTIME(String ENDTIME) {
            this.ENDTIME = ENDTIME;
            return this;
        }

        public Builder setUSETIME(String USETIME) {
            this.USETIME = USETIME;
            return this;
        }

        public Builder setBUSINESSBLOCK(String BUSINESSBLOCK) {
            this.BUSINESSBLOCK = BUSINESSBLOCK;
            return this;
        }

        public Builder setFIRSTCLASSSEAT(String FIRSTCLASSSEAT) {
            this.FIRSTCLASSSEAT = FIRSTCLASSSEAT;
            return this;
        }

        public Builder setSECONDCLASSSEAT(String SECONDCLASSSEAT) {
            this.SECONDCLASSSEAT = SECONDCLASSSEAT;
            return this;
        }

        public Builder setHIGHGRADESOFTBERTH(String HIGHGRADESOFTBERTH) {
            this.HIGHGRADESOFTBERTH = HIGHGRADESOFTBERTH;
            return this;
        }

        public Builder setORDINARYSOFTSLEEPER(String ORDINARYSOFTSLEEPER) {
            this.ORDINARYSOFTSLEEPER = ORDINARYSOFTSLEEPER;
            return this;
        }

        public Builder setHARDSLEEPER(String HARDSLEEPER) {
            this.HARDSLEEPER = HARDSLEEPER;
            return this;
        }

        public Builder setSOFTSEATS(String SOFTSEATS) {
            this.SOFTSEATS = SOFTSEATS;
            return this;
        }

        public Builder setHARDSEAT(String HARDSEAT) {
            this.HARDSEAT = HARDSEAT;
            return this;
        }

        public Builder setNOSEAT(String NOSEAT) {
            this.NOSEAT = NOSEAT;
            return this;
        }

        public Builder setREMARKS(String REMARKS) {
            this.REMARKS = REMARKS;
            return this;
        }

        public Ticket builder(){
           return new Ticket(this);
        }
    }

    public String getTRAINNUMBER() {
        return TRAINNUMBER;
    }

    public String getTICKETTYPE() {
        return TICKETTYPE;
    }

    public String getSTART() {
        return START;
    }

    public String getEND() {
        return END;
    }

    public String getSTARTTIME() {
        return STARTTIME;
    }

    public String getENDTIME() {
        return ENDTIME;
    }

    public String getUSETIME() {
        return USETIME;
    }

    public String getBUSINESSBLOCK() {
        return BUSINESSBLOCK;
    }

    public String getFIRSTCLASSSEAT() {
        return FIRSTCLASSSEAT;
    }

    public String getSECONDCLASSSEAT() {
        return SECONDCLASSSEAT;
    }

    public String getHIGHGRADESOFTBERTH() {
        return HIGHGRADESOFTBERTH;
    }

    public String getORDINARYSOFTSLEEPER() {
        return ORDINARYSOFTSLEEPER;
    }

    public String getHARDSLEEPER() {
        return HARDSLEEPER;
    }

    public String getSOFTSEATS() {
        return SOFTSEATS;
    }

    public String getHARDSEAT() {
        return HARDSEAT;
    }

    public String getNOSEAT() {
        return NOSEAT;
    }

    public String getREMARKS() {
        return REMARKS;
    }

    @Override
    public String toString() {
        return "Ticket{" +
                "TRAINNUMBER='" + TRAINNUMBER + '\'' +
                ", TICKETTYPE='" + TICKETTYPE + '\'' +
                ", START='" + START + '\'' +
                ", END='" + END + '\'' +
                ", STARTTIME='" + STARTTIME + '\'' +
                ", ENDTIME='" + ENDTIME + '\'' +
                ", USETIME='" + USETIME + '\'' +
                ", BUSINESSBLOCK='" + BUSINESSBLOCK + '\'' +
                ", FIRSTCLASSSEAT='" + FIRSTCLASSSEAT + '\'' +
                ", SECONDCLASSSEAT='" + SECONDCLASSSEAT + '\'' +
                ", HIGHGRADESOFTBERTH='" + HIGHGRADESOFTBERTH + '\'' +
                ", ORDINARYSOFTSLEEPER='" + ORDINARYSOFTSLEEPER + '\'' +
                ", HARDSLEEPER='" + HARDSLEEPER + '\'' +
                ", SOFTSEATS='" + SOFTSEATS + '\'' +
                ", HARDSEAT='" + HARDSEAT + '\'' +
                ", NOSEAT='" + NOSEAT + '\'' +
                ", REMARKS='" + REMARKS + '\'' +
                '}';
    }
}
